-record(gen_cdr,{
	start_time = "unknow",
	end_time = "unknow",
	end_reason = normal,
	call_type = data_network,
	rat_type = "LTE",
	calling_id = unknown
}).
-record(data_cdr,{
	duration = 0,
	up_traffic = 0,
	down_traffic = 0
}).
-record(gtp_cdr,{
	sgw,
	pgw
}).
-record(lte_gtp_cdr,{
	gen = #gen_cdr{},
	data = #data_cdr{},
	gtp = #gtp_cdr{}
}).
-record(wifi_cdr,{
	gen,
	data
}).

-record(lte_s1_cdr,{
	user_id, %%{id_type,id}
	rrc_con_reason, %%{tac, attach, eps connection}
	end_reason = undefined,
	start_time,
	end_time,
	end_mode,
	access_info = {{0,0,0,0},{0,0,0,0}}, %% cell, enodeb, mme
  cellid = 0,
  rate = {0,0},
  tac = 0,
	rab_info = [],
	aux_info = []
}).

-define(cdr_set_start_time(RecordName,Record,Time), Record#RecordName{gen = (Record#RecordName.gen)#gen_cdr{start_time = Time}}).
